#include "StdAfx.h"
#include "CriSec.h"


CCriSec::CCriSec(void)
{
	InitializeCriticalSection(&CriticalSection);
}

CCriSec::~CCriSec(void)
{
	DeleteCriticalSection(&CriticalSection);  
}

void CCriSec::lock()
{
	EnterCriticalSection(&CriticalSection);  
}

void CCriSec::unlock()
{
	LeaveCriticalSection(&CriticalSection); 
}